﻿
Partial Class Hosteria_VS_Estados
    Inherits System.Web.UI.Page

    Private Property dbResult As Integer

    Protected Sub btnAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAgregar.Click
        sdaEstados.InsertParameters.Item("Id").DefaultValue = txtId.Text
        sdaEstados.InsertParameters.Item("Descripcion").DefaultValue = txtDescripcion.Text()
        dbResult = sdaEstados.Insert()
        If dbResult = 1 Then
            txtId.Text = ""
            txtDescripcion.Text = ""
        Else
            MsgBox("No se pudo agregar.", MsgBoxStyle.Exclamation, "Error de sistema")
        End If
    End Sub
End Class
